Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@137522 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__config b/include/__config index 2f75ed8..76510f0 100644 --- a/include/__config +++ b/include/__config
@@ -160,6 +160,10 @@ #define _LIBCPP_HAS_NO_TRAILING_RETURN #endif +#if !(__has_feature(cxx_generalized_initializers)) +#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif + // Objective-C++ features (opt-in) #if __has_feature(objc_arc) #define _LIBCPP_HAS_OBJC_ARC @@ -244,6 +248,7 @@ #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS +#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
diff --git a/include/algorithm b/include/algorithm index 3e0938f..da9d0fe 100644 --- a/include/algorithm +++ b/include/algorithm
@@ -2233,6 +2233,8 @@ return _VSTD::min(__a, __b, __less<_Tp>()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _Tp, class _Compare> inline _LIBCPP_INLINE_VISIBILITY _Tp @@ -2249,6 +2251,8 @@ return *_VSTD::min_element(__t.begin(), __t.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // max_element template <class _ForwardIterator, class _Compare> @@ -2293,6 +2297,8 @@ return _VSTD::max(__a, __b, __less<_Tp>()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _Tp, class _Compare> inline _LIBCPP_INLINE_VISIBILITY _Tp @@ -2309,6 +2315,8 @@ return *_VSTD::max_element(__t.begin(), __t.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // minmax_element template <class _ForwardIterator, class _Compare> @@ -2388,6 +2396,8 @@ return _VSTD::minmax(__a, __b, __less<_Tp>()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _Tp> inline _LIBCPP_INLINE_VISIBILITY pair<_Tp, _Tp> @@ -2408,6 +2418,8 @@ return pair<_Tp, _Tp>(*__p.first, *__p.second); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // random_shuffle // __independent_bits_engine
diff --git a/include/deque b/include/deque index a3da803..69682a1 100644 --- a/include/deque +++ b/include/deque
@@ -1204,12 +1204,16 @@ typename enable_if<__is_input_iterator<_InputIter>::value>::type* = 0); deque(const deque& __c); deque(const deque& __c, const allocator_type& __a); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS deque(initializer_list<value_type> __il); deque(initializer_list<value_type> __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS deque& operator=(const deque& __c); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value); @@ -1227,8 +1231,10 @@ void assign(_RAIter __f, _RAIter __l, typename enable_if<__is_random_access_iterator<_RAIter>::value>::type* = 0); void assign(size_type __n, const value_type& __v); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS allocator_type get_allocator() const _NOEXCEPT; @@ -1313,9 +1319,11 @@ template <class _BiIter> iterator insert (const_iterator __p, _BiIter __f, _BiIter __l, typename enable_if<__is_bidirectional_iterator<_BiIter>::value>::type* = 0); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, initializer_list<value_type> __il) {return insert(__p, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS void pop_front(); void pop_back(); iterator erase(const_iterator __p); @@ -1452,6 +1460,8 @@ __append(__c.begin(), __c.end()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Allocator> deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il) { @@ -1465,6 +1475,8 @@ __append(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Allocator> deque<_Tp, _Allocator>& deque<_Tp, _Allocator>::operator=(const deque& __c)
diff --git a/include/forward_list b/include/forward_list index 6fe9311..0dd6bb2 100644 --- a/include/forward_list +++ b/include/forward_list
@@ -580,8 +580,10 @@ : base(_VSTD::move(__x)) {} forward_list(forward_list&& __x, const allocator_type& __a); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS forward_list(initializer_list<value_type> __il); forward_list(initializer_list<value_type> __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~forward_list() = default; @@ -592,7 +594,9 @@ __node_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable<allocator_type>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS forward_list& operator=(initializer_list<value_type> __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <class _InputIterator> typename enable_if @@ -602,7 +606,9 @@ >::type assign(_InputIterator __f, _InputIterator __l); void assign(size_type __n, const value_type& __v); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS void assign(initializer_list<value_type> __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -677,8 +683,10 @@ iterator >::type insert_after(const_iterator __p, _InputIterator __f, _InputIterator __l); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS iterator insert_after(const_iterator __p, initializer_list<value_type> __il) {return insert_after(__p, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS iterator erase_after(const_iterator __p); iterator erase_after(const_iterator __f, const_iterator __l); @@ -843,6 +851,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Alloc> forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il) { @@ -857,6 +867,8 @@ insert_after(cbefore_begin(), __il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Alloc> forward_list<_Tp, _Alloc>& forward_list<_Tp, _Alloc>::operator=(const forward_list& __x) @@ -910,6 +922,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Alloc> inline _LIBCPP_INLINE_VISIBILITY forward_list<_Tp, _Alloc>& @@ -919,6 +933,8 @@ return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Alloc> template <class _InputIterator> typename enable_if @@ -954,6 +970,8 @@ erase_after(__i, __e); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Alloc> inline _LIBCPP_INLINE_VISIBILITY void @@ -962,6 +980,8 @@ assign(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS
diff --git a/include/initializer_list b/include/initializer_list index f1bea94..745d3bd 100644 --- a/include/initializer_list +++ b/include/initializer_list
@@ -51,6 +51,8 @@ namespace std // purposefully not versioned { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _E> class _LIBCPP_VISIBLE initializer_list { @@ -94,6 +96,8 @@ return __il.end(); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + } // std #endif // _LIBCPP_INITIALIZER_LIST
diff --git a/include/list b/include/list index 79dcb37..fa515e0 100644 --- a/include/list +++ b/include/list
@@ -577,8 +577,10 @@ list(const list& __c); list(const list& __c, const allocator_type& __a); list& operator=(const list& __c); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS list(initializer_list<value_type> __il); list(initializer_list<value_type> __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES list(list&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value); @@ -588,17 +590,21 @@ __node_alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable<__node_allocator>::value); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY list& operator=(initializer_list<value_type> __il) {assign(__il.begin(), __il.end()); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <class _InpIter> void assign(_InpIter __f, _InpIter __l, typename enable_if<__is_input_iterator<_InpIter>::value>::type* = 0); void assign(size_type __n, const value_type& __x); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS allocator_type get_allocator() const _NOEXCEPT; @@ -673,9 +679,11 @@ template <class _InpIter> iterator insert(const_iterator __p, _InpIter __f, _InpIter __l, typename enable_if<__is_input_iterator<_InpIter>::value>::type* = 0); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, initializer_list<value_type> __il) {return insert(__p, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void swap(list& __c) @@ -830,6 +838,8 @@ push_back(*__i); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Alloc> list<_Tp, _Alloc>::list(initializer_list<value_type> __il, const allocator_type& __a) : base(__a) @@ -847,6 +857,8 @@ push_back(*__i); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Alloc> inline _LIBCPP_INLINE_VISIBILITY list<_Tp, _Alloc>&
diff --git a/include/map b/include/map index 2bb3523..886aecf 100644 --- a/include/map +++ b/include/map
@@ -774,6 +774,18 @@ map(map&& __m, const allocator_type& __a); _LIBCPP_INLINE_VISIBILITY + map& operator=(map&& __m) + _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) + { + __tree_ = _VSTD::move(__m.__tree_); + return *this; + } + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + + _LIBCPP_INLINE_VISIBILITY map(initializer_list<value_type> __il, const key_compare& __comp = key_compare()) : __tree_(__vc(__comp)) { @@ -788,21 +800,13 @@ } _LIBCPP_INLINE_VISIBILITY - map& operator=(map&& __m) - _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) - { - __tree_ = _VSTD::move(__m.__tree_); - return *this; - } - - _LIBCPP_INLINE_VISIBILITY map& operator=(initializer_list<value_type> __il) { __tree_.__assign_unique(__il.begin(), __il.end()); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY explicit map(const allocator_type& __a) @@ -943,10 +947,14 @@ insert(__e.__i_, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);} _LIBCPP_INLINE_VISIBILITY @@ -1523,6 +1531,18 @@ multimap(multimap&& __m, const allocator_type& __a); _LIBCPP_INLINE_VISIBILITY + multimap& operator=(multimap&& __m) + _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) + { + __tree_ = _VSTD::move(__m.__tree_); + return *this; + } + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + + _LIBCPP_INLINE_VISIBILITY multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare()) : __tree_(__vc(__comp)) { @@ -1537,20 +1557,13 @@ } _LIBCPP_INLINE_VISIBILITY - multimap& operator=(multimap&& __m) - _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) - { - __tree_ = _VSTD::move(__m.__tree_); - return *this; - } - - _LIBCPP_INLINE_VISIBILITY multimap& operator=(initializer_list<value_type> __il) { __tree_.__assign_multi(__il.begin(), __il.end()); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY explicit multimap(const allocator_type& __a) @@ -1679,10 +1692,14 @@ __tree_.__insert_multi(__e.__i_, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);} _LIBCPP_INLINE_VISIBILITY
diff --git a/include/random b/include/random index ace47a1..ac7b04d 100644 --- a/include/random +++ b/include/random
@@ -3399,9 +3399,11 @@ // constructors _LIBCPP_INLINE_VISIBILITY seed_seq() {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _Tp> _LIBCPP_INLINE_VISIBILITY seed_seq(initializer_list<_Tp> __il) {init(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _InputIterator> _LIBCPP_INLINE_VISIBILITY @@ -5715,9 +5717,11 @@ _LIBCPP_INLINE_VISIBILITY param_type(_InputIterator __f, _InputIterator __l) : __p_(__f, __l) {__init();} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY param_type(initializer_list<double> __wl) : __p_(__wl.begin(), __wl.end()) {__init();} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> param_type(size_t __nw, double __xmin, double __xmax, _UnaryOperation __fw); @@ -5760,9 +5764,11 @@ _LIBCPP_INLINE_VISIBILITY discrete_distribution(_InputIterator __f, _InputIterator __l) : __p_(__f, __l) {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY discrete_distribution(initializer_list<double> __wl) : __p_(__wl) {} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY discrete_distribution(size_t __nw, double __xmin, double __xmax, @@ -5942,8 +5948,10 @@ template<class _InputIteratorB, class _InputIteratorW> param_type(_InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> param_type(initializer_list<result_type> __bl, _UnaryOperation __fw); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); @@ -5993,11 +6001,13 @@ _InputIteratorW __fW) : __p_(__fB, __lB, __fW) {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY piecewise_constant_distribution(initializer_list<result_type> __bl, _UnaryOperation __fw) : __p_(__bl, __fw) {} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY @@ -6127,6 +6137,8 @@ } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _RealType> template<class _UnaryOperation> piecewise_constant_distribution<_RealType>::param_type::param_type( @@ -6150,6 +6162,8 @@ } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _RealType> template<class _UnaryOperation> piecewise_constant_distribution<_RealType>::param_type::param_type( @@ -6258,8 +6272,10 @@ template<class _InputIteratorB, class _InputIteratorW> param_type(_InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> param_type(initializer_list<result_type> __bl, _UnaryOperation __fw); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); @@ -6309,11 +6325,13 @@ _InputIteratorW __fW) : __p_(__fB, __lB, __fW) {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY piecewise_linear_distribution(initializer_list<result_type> __bl, _UnaryOperation __fw) : __p_(__bl, __fw) {} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _UnaryOperation> _LIBCPP_INLINE_VISIBILITY @@ -6447,6 +6465,8 @@ } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _RealType> template<class _UnaryOperation> piecewise_linear_distribution<_RealType>::param_type::param_type( @@ -6470,6 +6490,8 @@ } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template<class _RealType> template<class _UnaryOperation> piecewise_linear_distribution<_RealType>::param_type::param_type(
diff --git a/include/regex b/include/regex index 9eef160..5e19569 100644 --- a/include/regex +++ b/include/regex
@@ -2478,12 +2478,14 @@ : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), __end_(0) {__parse(__first, __last);} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_regex(initializer_list<value_type> __il, flag_type __f = regex_constants::ECMAScript) : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), __end_(0) {__parse(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~basic_regex() = default; @@ -2492,9 +2494,11 @@ _LIBCPP_INLINE_VISIBILITY basic_regex& operator=(const value_type* __p) {return assign(__p);} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_regex& operator=(initializer_list<value_type> __il) {return assign(__il);} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <class _ST, class _SA> _LIBCPP_INLINE_VISIBILITY basic_regex& operator=(const basic_string<value_type, _ST, _SA>& __p) @@ -2557,11 +2561,15 @@ __parse(__first, __last); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY basic_regex& assign(initializer_list<value_type> __il, flag_type __f = regex_constants::ECMAScript) {return assign(__il.begin(), __il.end(), __f);} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // const operations: _LIBCPP_INLINE_VISIBILITY unsigned mark_count() const {return __marked_count_;} @@ -6069,11 +6077,13 @@ const regex_type& __re, const vector<int>& __submatches, regex_constants::match_flag_type __m = regex_constants::match_default); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, const regex_type& __re, initializer_list<int> __submatches, regex_constants::match_flag_type __m = regex_constants::match_default); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <size_t _N> regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, @@ -6162,6 +6172,8 @@ __init(__a, __b); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _BidirectionalIterator, class _CharT, class _Traits> regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, @@ -6175,6 +6187,8 @@ __init(__a, __b); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _BidirectionalIterator, class _CharT, class _Traits> template <size_t _N> regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
diff --git a/include/set b/include/set index 9248fd7..fe3d382 100644 --- a/include/set +++ b/include/set
@@ -437,6 +437,7 @@ set(set&& __s, const allocator_type& __a); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY set(initializer_list<value_type> __il, const value_compare& __comp = value_compare()) : __tree_(__comp) @@ -458,6 +459,7 @@ __tree_.__assign_unique(__il.begin(), __il.end()); return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -542,9 +544,11 @@ __tree_.__insert_unique(__e, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p);} @@ -771,6 +775,7 @@ multiset(multiset&& __s, const allocator_type& __a); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY multiset(initializer_list<value_type> __il, const value_compare& __comp = value_compare()) : __tree_(__comp) @@ -792,6 +797,7 @@ __tree_.__assign_multi(__il.begin(), __il.end()); return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -876,9 +882,11 @@ __tree_.__insert_multi(__e, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p);}
diff --git a/include/string b/include/string index 8d48e0a..7fdf0d8 100644 --- a/include/string +++ b/include/string
@@ -1150,10 +1150,12 @@ template<class _InputIterator> _LIBCPP_INLINE_VISIBILITY basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string(initializer_list<value_type> __il); _LIBCPP_INLINE_VISIBILITY basic_string(initializer_list<value_type> __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS ~basic_string(); @@ -1166,8 +1168,10 @@ #endif _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s) {return assign(__s);} basic_string& operator=(value_type __c); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_DEBUG _LIBCPP_INLINE_VISIBILITY @@ -1240,7 +1244,9 @@ _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const basic_string& __str) {return append(__str);} _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const_pointer __s) {return append(__s);} _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(value_type __c) {push_back(__c); return *this;} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& append(const basic_string& __str); @@ -1263,8 +1269,10 @@ basic_string& >::type append(_ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& append(initializer_list<value_type> __il) {return append(__il.begin(), __il.size());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS void push_back(value_type __c); _LIBCPP_INLINE_VISIBILITY @@ -1300,8 +1308,10 @@ basic_string& >::type assign(_ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& insert(size_type __pos1, const basic_string& __str); @@ -1327,9 +1337,11 @@ iterator >::type insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __pos, initializer_list<value_type> __il) {return insert(__pos, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS basic_string& erase(size_type __pos = 0, size_type __n = npos); _LIBCPP_INLINE_VISIBILITY @@ -1358,9 +1370,11 @@ basic_string& >::type replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<value_type> __il) {return replace(__i1, __i2, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS size_type copy(pointer __s, size_type __n, size_type __pos = 0) const; _LIBCPP_INLINE_VISIBILITY @@ -1942,6 +1956,8 @@ __init(__first, __last); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _CharT, class _Traits, class _Allocator> _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_type> __il) @@ -1957,6 +1973,8 @@ __init(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _CharT, class _Traits, class _Allocator> basic_string<_CharT, _Traits, _Allocator>::~basic_string() {
diff --git a/include/unordered_map b/include/unordered_map index bf6b688..cb30fc8 100644 --- a/include/unordered_map +++ b/include/unordered_map
@@ -684,12 +684,14 @@ _NOEXCEPT_(is_nothrow_move_constructible<__table>::value); unordered_map(unordered_map&& __u, const allocator_type& __a); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_map(initializer_list<value_type> __il); unordered_map(initializer_list<value_type> __il, size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); unordered_map(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_map() = default; _LIBCPP_INLINE_VISIBILITY unordered_map& operator=(const unordered_map& __u) @@ -701,7 +703,9 @@ unordered_map& operator=(unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_map& operator=(initializer_list<value_type> __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -788,9 +792,11 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _InputIterator> void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);} @@ -986,6 +992,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( initializer_list<value_type> __il) @@ -1013,6 +1021,8 @@ insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> @@ -1027,6 +1037,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> inline _LIBCPP_INLINE_VISIBILITY unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& @@ -1037,6 +1049,8 @@ return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS @@ -1292,6 +1306,7 @@ _NOEXCEPT_(is_nothrow_move_constructible<__table>::value); unordered_multimap(unordered_multimap&& __u, const allocator_type& __a); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_multimap(initializer_list<value_type> __il); unordered_multimap(initializer_list<value_type> __il, size_type __n, const hasher& __hf = hasher(), @@ -1299,6 +1314,7 @@ unordered_multimap(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_multimap() = default; _LIBCPP_INLINE_VISIBILITY unordered_multimap& operator=(const unordered_multimap& __u) @@ -1310,7 +1326,9 @@ unordered_multimap& operator=(unordered_multimap&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_multimap& operator=(initializer_list<value_type> __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -1393,9 +1411,11 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _InputIterator> void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);} @@ -1582,6 +1602,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( initializer_list<value_type> __il) @@ -1609,6 +1631,8 @@ insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> @@ -1623,6 +1647,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> inline _LIBCPP_INLINE_VISIBILITY unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& @@ -1633,6 +1659,8 @@ return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS
diff --git a/include/unordered_set b/include/unordered_set index 2ef5433..d7615fa 100644 --- a/include/unordered_set +++ b/include/unordered_set
@@ -365,6 +365,7 @@ _NOEXCEPT_(is_nothrow_move_constructible<__table>::value); unordered_set(unordered_set&& __u, const allocator_type& __a); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_set(initializer_list<value_type> __il); unordered_set(initializer_list<value_type> __il, size_type __n, const hasher& __hf = hasher(), @@ -372,6 +373,7 @@ unordered_set(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_set() = default; _LIBCPP_INLINE_VISIBILITY unordered_set& operator=(const unordered_set& __u) @@ -383,7 +385,9 @@ unordered_set& operator=(unordered_set&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_set& operator=(initializer_list<value_type> __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -437,9 +441,11 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _InputIterator> void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p);} @@ -607,6 +613,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Value, class _Hash, class _Pred, class _Alloc> unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( initializer_list<value_type> __il) @@ -634,6 +642,8 @@ insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _Value, class _Hash, class _Pred, class _Alloc> @@ -648,6 +658,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Value, class _Hash, class _Pred, class _Alloc> inline _LIBCPP_INLINE_VISIBILITY unordered_set<_Value, _Hash, _Pred, _Alloc>& @@ -658,6 +670,8 @@ return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Value, class _Hash, class _Pred, class _Alloc> template <class _InputIterator> inline _LIBCPP_INLINE_VISIBILITY @@ -763,6 +777,7 @@ _NOEXCEPT_(is_nothrow_move_constructible<__table>::value); unordered_multiset(unordered_multiset&& __u, const allocator_type& __a); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_multiset(initializer_list<value_type> __il); unordered_multiset(initializer_list<value_type> __il, size_type __n, const hasher& __hf = hasher(), @@ -770,6 +785,7 @@ unordered_multiset(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_multiset() = default; _LIBCPP_INLINE_VISIBILITY unordered_multiset& operator=(const unordered_multiset& __u) @@ -781,7 +797,9 @@ unordered_multiset& operator=(unordered_multiset&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_multiset& operator=(initializer_list<value_type> __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -833,9 +851,11 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _InputIterator> void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p);} @@ -1004,6 +1024,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Value, class _Hash, class _Pred, class _Alloc> unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( initializer_list<value_type> __il) @@ -1031,6 +1053,8 @@ insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _Value, class _Hash, class _Pred, class _Alloc> @@ -1046,6 +1070,8 @@ #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Value, class _Hash, class _Pred, class _Alloc> inline unordered_multiset<_Value, _Hash, _Pred, _Alloc>& @@ -1056,6 +1082,8 @@ return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Value, class _Hash, class _Pred, class _Alloc> template <class _InputIterator> inline _LIBCPP_INLINE_VISIBILITY
diff --git a/include/valarray b/include/valarray index d7a173c..62c1c66 100644 --- a/include/valarray +++ b/include/valarray
@@ -798,8 +798,10 @@ valarray(const valarray& __v); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray(valarray&& __v); - valarray(initializer_list<value_type> __il); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + valarray(initializer_list<value_type> __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS valarray(const slice_array<value_type>& __sa); valarray(const gslice_array<value_type>& __ga); valarray(const mask_array<value_type>& __ma); @@ -810,8 +812,10 @@ valarray& operator=(const valarray& __v); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray& operator=(valarray&& __v); - valarray& operator=(initializer_list<value_type>); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + valarray& operator=(initializer_list<value_type>); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS valarray& operator=(const value_type& __x); valarray& operator=(const slice_array<value_type>& __sa); valarray& operator=(const gslice_array<value_type>& __ga); @@ -2708,6 +2712,10 @@ __v.__begin_ = __v.__end_ = nullptr; } +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp> valarray<_Tp>::valarray(initializer_list<value_type> __il) : __begin_(0), @@ -2734,7 +2742,7 @@ } } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <class _Tp> valarray<_Tp>::valarray(const slice_array<value_type>& __sa) @@ -2884,6 +2892,10 @@ return *this; } +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp> inline _LIBCPP_INLINE_VISIBILITY valarray<_Tp>& @@ -2895,7 +2907,7 @@ return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <class _Tp> inline _LIBCPP_INLINE_VISIBILITY
diff --git a/include/vector b/include/vector index 8d9b421..43a67d8 100644 --- a/include/vector +++ b/include/vector
@@ -532,10 +532,12 @@ template <class _ForwardIterator> vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a, typename enable_if<__is_forward_iterator<_ForwardIterator>::value>::type* = 0); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY vector(initializer_list<value_type> __il); _LIBCPP_INLINE_VISIBILITY vector(initializer_list<value_type> __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifdef _LIBCPP_DEBUG _LIBCPP_INLINE_VISIBILITY ~vector() {__invalidate_all_iterators();} @@ -557,9 +559,11 @@ __alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable<allocator_type>::value); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY vector& operator=(initializer_list<value_type> __il) {assign(__il.begin(), __il.end()); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <class _InputIterator> typename enable_if @@ -578,9 +582,11 @@ assign(_ForwardIterator __first, _ForwardIterator __last); void assign(size_type __n, const_reference __u); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -681,9 +687,11 @@ iterator >::type insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __position, initializer_list<value_type> __il) {return insert(__position, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position); iterator erase(const_iterator __first, const_iterator __last); @@ -1056,6 +1064,8 @@ } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Allocator> _LIBCPP_INLINE_VISIBILITY inline vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il) @@ -1079,6 +1089,8 @@ } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Tp, class _Allocator> _LIBCPP_INLINE_VISIBILITY inline vector<_Tp, _Allocator>& @@ -1854,8 +1866,10 @@ vector(const vector& __v); vector(const vector& __v, const allocator_type& __a); vector& operator=(const vector& __v); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS vector(initializer_list<value_type> __il); vector(initializer_list<value_type> __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -1868,9 +1882,11 @@ __alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable<allocator_type>::value); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY vector& operator=(initializer_list<value_type> __il) {assign(__il.begin(), __il.end()); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template <class _InputIterator> typename enable_if @@ -1889,9 +1905,11 @@ assign(_ForwardIterator __first, _ForwardIterator __last); void assign(size_type __n, const value_type& __x); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT {return allocator_type(this->__alloc());} @@ -1979,9 +1997,11 @@ iterator >::type insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __position, initializer_list<value_type> __il) {return insert(__position, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position); iterator erase(const_iterator __first, const_iterator __last); @@ -2351,6 +2371,8 @@ } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Allocator> vector<bool, _Allocator>::vector(initializer_list<value_type> __il) : __begin_(0), @@ -2379,6 +2401,8 @@ } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template <class _Allocator> vector<bool, _Allocator>::~vector() {